//Kyle Marshall
//Assignment 3
//marshaky@onid.oregonstate.edu
//cs362

#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>

//testing the fullDeckCount function in dominion.c
int main (int argc, char** argv) {
  struct gameState G;
  int k[10] = {adventurer, gardens, embargo, village, minion, mine, cutpurse, 
           sea_hag, tribute, smithy};
  int count, i;
  int seed = 1000;
  memset(&G, 23, sizeof(struct gameState)); 
  initializeGame(2, k, seed, &G);
//test initial count
  count = fullDeckCount(0, 1, &G);
  printf("The initial count of estates should be 3 . The actual count is: %d\n",count);
  
  if (count == 3){
  	printf("Initial Test Passed \n");
  }else{
  	printf("Initial Test Failed \n");
  }

count = fullDeckCount(0, 2, &G);
printf("The initial count of duchys should be 0 . The actual count is: %d\n",count);
  
if (count == 0){
	printf("Initial Test Passed \n");
}else{
	printf("Initial Test Failed \n");
}

//test manual input
for(i=0; i < 5;i++){
	G.deck[0][i] = adventurer;
}
count = fullDeckCount(0, 7, &G);
printf("The manual input count of adventurer should be 5 . The actual count is: %d\n",count);
  
  if (count == 5){
  	printf("Manual Test Passed \n");
  }else{
  	printf("Manual Test Failed \n");
  }
//test for invalid input
count = fullDeckCount(0, -100, &G);
printf("The count for invalid input should be 0 . The actual count is: %d\n",count);
  
if (count == 0){
	printf("Invalid input Test Passed \n");
}else{
	printf("Invalid input Test Failed \n");
}

count = fullDeckCount(0, 100, &G);
printf("The count for invalid input should be 0 . The actual count is: %d\n",count);
  
if (count == 0){
	printf("Invalid input Test Passed \n");
}else{
	printf("Invalid input Test Failed \n");
}

  return 0;
}